/**
 * Route Mappings
 * (sails.config.routes)
 *
 * Your routes tell Sails what to do each time it receives a request.
 *
 * For more information on configuring custom routes, check out:
 * https://sailsjs.com/anatomy/config/routes-js
 */

module.exports.routes = {

  /***************************************************************************
  *                                                                          *
  * Make the view located at `views/homepage.ejs` your home page.            *
  *                                                                          *
  * (Alternatively, remove this and add an `index.html` file in your         *
  * `assets` directory)                                                      *
  *                                                                          *
  ***************************************************************************/

  // '/': { view: 'pages/homepage' },


  /***************************************************************************
  *                                                                          *
  * More custom routes here...                                               *
  * (See https://sailsjs.com/config/routes for examples.)                    *
  *                                                                          *
  * If a request to a URL doesn't match any of the routes in this file, it   *
  * is matched against "shadow routes" (e.g. blueprint routes).  If it does  *
  * not match any of those, it is matched against static assets.             *
  *                                                                          *
  ***************************************************************************/

  'post /user/register': {action: 'user/register'},
  'post /user/registerSuperUser': {action: 'user/registerSuperUser'},
  'post /user/login': {action: 'user/login'}, 
  'post /user/logout': {action: 'user/logout'},
  'get /user/getUserCount': {action: 'user/getUserCount'},
  'get /user/getAdminCount': {action: 'user/getAdminCount'},
  'get /user/getCurrentUser': {action: 'user/getCurrentUser'},
  'get /user/getAllUserInfo': {action: 'user/getAllUser'},
  'post /user/activeUser': {action: 'user/activeUser'},
  'post /user/updateUserRole': {action: 'user/updateUserRole'},

  'post /record/createRecord': {action: 'record/createRecord'},
  'get /record/getAllCaseRecord': {action: 'record/getAllCaseRecord'},
  'post /record/updateCaseRecord': {action: 'record/updateCaseRecord'},
  'get /record/getCaseRecordWithCondition': {action: 'record/getCaseRecordWithCondition'}, 

  'post /prescription/createPrescription': {action: 'prescription/createPrescription'},
  'get /prescription/getAllPrescription': {action: 'prescription/getAllPrescription'},
  'post /prescription/updatePrescription': {action: 'prescription/updatePrescription'},
  'get /prescription/getPrescriptionWithCondition': {action: 'prescription/getPrescriptionWithCondition'}, 

  'post /prescription/createProject': {action: 'prescription/createProject'},
  'get /prescription/getAllProject': {action: 'prescription/getAllProject'},
  'post /prescription/updateProject': {action: 'prescription/updateProject'},
  'get /prescription/getProjectWithCondition': {action: 'prescription/getProjectWithCondition'}, 
};
